from selenium import webdriver  # 导入webdriver包

def init_driver(brower="Chrome",timeout=30):
    driver=None
    if brower=="Chrome":
        driver = webdriver.Chrome()
    elif brower=="FireFox":
        driver= webdriver.Firefox()
    elif brower=="IE":
        driver=webdriver.Ie()

    driver.maximize_window()  # 最大化浏览器
    driver.implicitly_wait(timeout)
    return driver